package com.mfp.java.testYou.core.servlets;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mfp.java.testYou.core.utils.UrlUtils;

@Deprecated
public class RedirectServlet extends HttpServlet {

	private static final long serialVersionUID = -1225329832539003220L;

	public void doGet(HttpServletRequest req, HttpServletResponse resp) {
		doPost(req, resp);
	}

	public void doPost(HttpServletRequest req, HttpServletResponse resp) {
		String target = getInitParameter("target");
		UrlUtils.redirectToTarget(req, resp, target);
	}

}
